﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using OrganizeYourSearch.Helpers;

namespace OrganizeYourSearchTest
{
    [TestClass]
    public class TestFileNameHelper
    {
        [TestMethod]
        public void TestRemoveExtension()
        {
            string stringWithoutExtension = FileNameHelper.RemoveExension("C:\\MyFile.xaml");
            Assert.AreEqual<string>("C:\\MyFile", stringWithoutExtension, "Sorry, the full file name doesn't match");
        }
        [TestMethod]
        public void TestGetFileNameOnlyWithExtension()
        {
            string filenameWithExtension = FileNameHelper.GetFileNameOnlyWithExtension("C:\\MyFile.xaml");
            Assert.AreEqual<string>("MyFile.xaml", filenameWithExtension, "Sorry, the full file name doesn't match");
        }

        [TestMethod]
        public void TestGetFileNameOnlyWithoutExtension()
        {
            string filenameWithoutExtension = FileNameHelper.GetFileNameOnlyWithoutExtension("C:\\MyFile.xaml");
            Assert.AreEqual<string>("MyFile", filenameWithoutExtension, "Sorry, the full file name doesn't match");
        }

        [TestMethod]
        public void TestGetFilePathWithFileNameWithoutExtension()
        {
            string filePathWithoutExtension = FileNameHelper.GetFilePathWithFileNameWithoutExtension("C:\\MyFile.xaml");
            Assert.AreEqual<string>("C:\\MyFile", filePathWithoutExtension, "Sorry, the full file name doesn't match");
        }
    }
}
